import  service  from "../../utils/request"

export const salesOrderApi = {
    create(data) {
        return service({
            url: '/salesOrder',
            method: 'post',
            data
        })
    },
    getListAll(params) {
        return service({
            url: '/salesOrder/list',
            method: 'get',
            params
        })
    },
    // 获取销售单列表
    getList(params) {
        return service({
            url: '/salesOrder/page',
            method: 'get',
            params
        })
    },
    // 更新销售单
    update(data) {
        return service({
            url: '/salesOrder',
            method: 'put',
            data
        })
    },
    // 删除销售单
    delete(id) {
        return service.delete(`/salesOrder/${id}`)
    }
}
